package com.linkage.educloud.ah.decoration;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by 周振 on 2017/4/20.
 */

public class LinerItemNoPaddingDecoration extends RecyclerView.ItemDecoration {
    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
//        super.getItemOffsets(new Rect(10,10,10,10), view, parent, state);
//        outRect.set(0,10,0,10);
        outRect.left = 0;
        outRect.right = 0;
        outRect.bottom = 10;
        if (parent.getChildPosition(view) == 0)
            outRect.top = 0;
    }


}
